const globalApiPrefix = '/suiy-api';
let redisAddress = '127.0.0.1:6379:';
let databaseName = 'suiy'
let mysqlConfig = {
    host: '127.0.0.1',
    port: 3306,
    username: 'root',
    password: '123456',
}
let env = 'dev'
// let env = 'dev'
if (env === 'dev') {
    mysqlConfig = {
        host: '111.229.239.187',// 腾讯云
        port: 3609,
        username: 'root',
        password: 'huangqinghua@123!@',
    }
    redisAddress = '111.229.239.187:6388:'
}
if (env === 'prod') {
    mysqlConfig = {
        host: '127.0.0.1',
        port: 3609,
        username: 'root',
        password: 'W4>0&9Frt$dfa120)!g4362',
    }
    redisAddress = '127.0.0.1:6388:'
    databaseName = 'suiy'
}
export default {
    GlobalApiPrefix: globalApiPrefix,
    ApiHeaderKey: 'api-token', // 用户调用api的headers的key
    ManageHeaderKey: 'manage-token',// 用户后台管理系统headers的key
    AdminHeaderKey: 'admin-token',// 管理员后台管理系统headers的key
    ApiTokenExpireSec: 365*24*60*60,// API token过期时间(秒)
    ManageTokenExpireSec: 30*24*60*60,// 用户后台管理系统 token过期时间(秒)
    AdminTokenExpireSec: 3*60*60,// 管理员后台管理系统 token过期时间(秒)
    ManageSecretKey: 'rvizRy63IxrqkuDpLD59SlDbOx6Ffq0V',
    AdminSecretKey: 'v8TAiEo90or2eZAloeAqX1dvt7euzqr2',
    iv: 'd8dc0c00684a6678451f126c3c739c4c',
    Redis: [redisAddress],
    Mysql: {
        ...mysqlConfig,
        database: databaseName,
        entities: [],
        synchronize: true, // 是否自动将实体类同步到数据库
    },

    AuthExternal: [
        `${globalApiPrefix}/api/user/login`,
        `${globalApiPrefix}/api/auth/login`,
    ],
    ManagePathArr: [
        `${globalApiPrefix}/api/user/get`,
        `${globalApiPrefix}/api/user/password-reset`,
        `${globalApiPrefix}/api/user/info-update`,
        `${globalApiPrefix}/api/user/model-list`,
        `${globalApiPrefix}/api/record/query-list`,
        `${globalApiPrefix}/api/auth/get-api-token`,
    ],
    AdminPathArr: [
        `${globalApiPrefix}/api/auth/create-api-token`,
        `${globalApiPrefix}/api/auth/get-api-token`,
        `${globalApiPrefix}/api/auth/model-list`,
        `${globalApiPrefix}/api/user/list`,
        `${globalApiPrefix}/api/user/create`,
        `${globalApiPrefix}/api/user/info-update`,
        `${globalApiPrefix}/api/user/password-reset`,
        `${globalApiPrefix}/api/user/status-update`,
        `${globalApiPrefix}/api/user/recharge`,
        `${globalApiPrefix}/api/record/query-list`,
        `${globalApiPrefix}/api/log/list`,
    ],
    ApiPathArr: [
        `${globalApiPrefix}/stream/tencent/chat`,
        `${globalApiPrefix}/stream/volces/chat`,
        `${globalApiPrefix}/stream/baidu/chat`,
    ],

}
